package router

import (
	"github.com/gin-gonic/gin"
	"liao/api/handler"
	"liao/middle"
)

func Router(r *gin.Engine) {
	r.POST("sendSms", handler.SendSms)
	r.GET("login", handler.Login)
	r.GET("userList", middle.ParseToken, handler.UserList)
	r.POST("apply", handler.Apply)
	r.POST("statusUp", handler.StatusUp)
	chatHandler := handler.NewChatHandler()
	chat := r.Group("/api")
	chat.GET("chat", chatHandler.Chat)
}
